package com.uinnova.springboot.web.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class MyServletContextListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println(sce.getServletContext().getServerInfo());
        System.out.println("ServletContext已经被创建了");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

        System.out.println("ServletContext被销毁");
    }
}
